#define _CRT_SECURE_NO_WARNINGS 1
#if 0
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
int main()
{
	int(*p)[5], n = 1;
	p = (int*)malloc(sizeof(int) * 3 * 5);
	assert(p);
	for (int i = 0; i < 3; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			p[i][j] = n++;
			printf("%d ", p[i][j]);
		}
		printf("\n");
	}
	free(p);
	return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
int main()
{
	int** p = NULL;
	int n = 1;
	p = malloc(sizeof(int*) * 3);
	assert(p);
	for (int i = 0; i < 3; i++)
	{
		p[i] = (int*)malloc(sizeof(int) * 5);
		assert(p[i]);
		for (int j = 0; j < 5; j++)
		{
			p[i][j] = n++;
			printf("%d ", p[i][j]);
		}
		printf("\n");
	}
	return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
int main()
{
	int arr1[5] = { 1,2,3,4,5 };
	int arr2[5] = { 2,3,4,5,6 };
	int arr3[5] = { 3,4,5,6,7 };
	int* p[3] = { arr1,arr2,arr3 };
	for (int i = 0; i < 3; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			printf("%d ", p[i][j]);
		}
		printf("\n");
	}
	return 0;
}
#endif

